#ifndef RISING_STAR_DATABASE_MYSQL_H
#define RISING_STAR_DATABASE_MYSQL_H

#include "Database.h"
#include <mysql/mysql.h>
namespace RisingStar
{
	class CDatabaseMysql:public CDatabase
	{
		public:
		CDatabaseMysql();
		~CDatabaseMysql();
		
		//连接数据库
		virtual bool Connect(string username,string password,string dataname,string ip,WORD port = 3306);
		//执行数据库操作
		virtual bool Execute(string sql);
		//获取详细信息
		virtual bool Detail(string sql,map<string,string>& detail);
		//查询列表
		virtual bool SearchList(string sql,list<map<string,string> >& infoList);
		//关闭连接
		virtual bool Close();
		private:
		MYSQL mConn;
	};
	
};

#endif